using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Collections.Generic;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

using Bll;
using Entities;

public partial class searchresults : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {            
            List<ProductInfo> proList = (List<ProductInfo>)HttpContext.Current.Session["SearchResult"];
            if (proList != null)
            {

                rp.DataSource = proList;
                rp.DataBind();
                //for (int i = 0; i < proList.Count; i++ )
                //{
                //    hlProductName.Text += proList[i].ProductName + "<br />";
                //    hlProductName.NavigateUrl = "productdetail.aspx?readID=" + proList[i].ProductID;
                //    lblUnitPrice.Text += proList[i].UnitPrice.ToString("C") + "<br />";
                //}
                //proList[0].
            }
        }
    }
    protected override void OnUnload(EventArgs e)
    {
        Session.Remove("SearchResult");
    }
}
